<?php

     echo "
     <tr align='left'>
         <td align='left' colspan='2'>
             <H2>Display Order</H2>
         </td>
     </tr>

";
if ($intOrderID){ 
    include (MODULE . "/action/qrySelectOrder");

echo "
    <tr>
         <td align='left'>
             <a href='" . ScreenURL("EnterOrder",array('intOrderID'=>$myrow[0]) ) . "'>
             <img src='./images".SITE_SUFFIX."/update.gif' width='65' height='13' border='0' alt='Update' align='middle'></a>
         </td>
         <td align='right'>
              <a href=\"" . ScreenURL("EnterOrder",array('intOrderID'=>$myrow[0],'ACTION'=>"qryDeleteOrder") ) . "\"
                 onclick=\"return confirmLink(this, 'Delete ');\">
              <img src='./images".SITE_SUFFIX."/delete.gif' border='0' alt='Update' align='middle'></a>
         </td>
    </tr>";

		$boBG = -1 - $boBG; //alternate $boBG values from -1 and 0
		$intTotal = $intTotal + $myrow["Amount"];
echo "
     <tr>
         <td align='left'>
             <b> : </b>
         </td>
         <td align='left'>
             ".$myrow[ID]."
         </td>
     </tr>
";

    //LONG
echo "
     <tr align='left'>
         <td align='left'>
             <b>Customer : </b>
             
         </td>
         <td align='left'>
            <a href=\"JavaScript: newWindow = openWin( '" . ScreenURL("DisplayCustomer",array('intCustomerID'=>$myrow[Customer])) . "', 'DisplayCustomer', 'width=800,height=600,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=1,resizable=1' ); newWindow.focus()\">
             ".DisplayLookupValue("tblCustomer","Customer",$myrow[Customer])."
            </a>
         </td>
     </tr>
";
echo "
     <tr>
         <td align='left'>
             <b>OrderDate : </b>
         </td>
         <td align='left'>
             ".ReformatFromMySqlDate($myrow[OrderDate])."
         </td>
     </tr>
";

echo "
     <tr>
         <td align='left'>
             <b>Shipped Date : </b>
         </td>
         <td align='left'>
             ".ReformatFromMySqlDate($myrow[ShippedDate])."
         </td>
     </tr>
";

    //LONG
echo "
     <tr align='left'>
         <td align='left'>
             <b>Courier : </b>
             
         </td>
         <td align='left'>
            <a href=\"JavaScript: newWindow = openWin( '" . ScreenURL("DisplayCourier",array('intCourierID'=>$myrow[Courier])) . "', 'DisplayCourier', 'width=800,height=600,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=1,resizable=1' ); newWindow.focus()\">
             ".DisplayLookupValue("tblCourier","Courier",$myrow[Courier])."
            </a>
         </td>
     </tr>
";
echo "
     <tr>
         <td align='left'>
             <b>Freight : </b>
         </td>
         <td align='left'>
             ".$myrow[Freight]."
         </td>
     </tr>
";

    //ELSE
    //Nothing
echo "
     <tr>
         <td align='left'>
             <b>Name : </b>
         </td>
         <td align='left'>
             ".$myrow[ShipName]."
         </td>
     </tr>
";

    //ELSE
    //Nothing
echo "
     <tr>
         <td align='left'>
             <b>Address : </b>
         </td>
         <td align='left'>
             ".$myrow[ShipAddress]."
         </td>
     </tr>
";

    //ELSE
    //Nothing
echo "
     <tr>
         <td align='left'>
             <b>Address2 : </b>
         </td>
         <td align='left'>
             ".$myrow[ShipAddress2]."
         </td>
     </tr>
";

    //ELSE
    //Nothing
echo "
     <tr>
         <td align='left'>
             <b>City : </b>
         </td>
         <td align='left'>
             ".$myrow[ShipCity]."
         </td>
     </tr>
";

    //ELSE
    //Nothing
echo "
     <tr>
         <td align='left'>
             <b>Region : </b>
         </td>
         <td align='left'>
             ".$myrow[ShipRegion]."
         </td>
     </tr>
";

    //ELSE
    //Nothing
echo "
     <tr>
         <td align='left'>
             <b>Postal Code : </b>
         </td>
         <td align='left'>
             ".$myrow[ShipPostalCode]."
         </td>
     </tr>
";

    //ELSE
    //Nothing
echo "
     <tr>
         <td align='left'>
             <b>Country : </b>
         </td>
         <td align='left'>
             ".$myrow[ShipCountry]."
         </td>
     </tr>
";

    //ELSE
    //Nothing
echo "
     <tr>
         <td align='left'>
             <b>Phone : </b>
         </td>
         <td align='left'>
             ".$myrow[ShipPhone]."
         </td>
     </tr>
";

    //ELSE
    //Nothing
echo "
    <tr>
         <td align='left'>
             <a href='" . ScreenURL("EnterOrder",array('intOrderID'=>$myrow[0]) ) . "'>
             <img src='./images".SITE_SUFFIX."/update.gif' width='65' height='13' border='0' alt='Update' align='middle'></a>
         </td>
         <td align='right'>
              <a href=\"" . ScreenURL("EnterOrder",array('intOrderID'=>$myrow[0],'ACTION'=>"qryDeleteOrder") ) . "\"
                 onclick=\"return confirmLink(this, 'Delete ');\">
              <img src='./images".SITE_SUFFIX."/delete.gif' border='0' alt='Update' align='middle'></a>
         </td>
    </tr>";
}else{
echo "
    <tr>
         <td align='center'>
              No Order selected.
         </td>
    </tr>
";
}
